using System;
using System.Collections;
using Internal;

namespace H5Engine
{
    /// <summary>
    /// 曲线基础接口
    /// 等间隔
    /// </summary>
    public abstract class LogCurve
    {

        
        /// <summary>
        /// 获取指定深度上的数据索引
        /// </summary>
        /// <returns></returns>
        protected int GetDepthIndex(double depth)
        {
            return (int)((depth - this.StartDepth) / this.Interval + 0.5);
        }


        /// <summary>
        /// 曲线名字
        /// </summary>
        /// <value></value>
        public string Name {get; set;}
        public double StartDepth {get; set;}
        public double EndDepth {get; set;}

        public double Interval {get; set;}


        private string _name; //Field
        public string GetName(){
            return _name;
        }
        public string SetName(string name)
        {
            _name = name;
        }
        
        public static void Test()
        {
            LogCurve curve = new LogCurve();
           
            curve.Name = "abc";
            curve.SetName("abc");

            Console.WriteLine(curve.Name);
            Console.WriteLine(curve.GetName());
        }
    }

    //

}